Reduce number of log IDs allocated to vehicles, rearrange #19562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the following patch:
I get the following output:
Which means we have 57 ids "after the break" - available for
logger.Log_write(...)
andlogger.LogWriteStreaming(...)
to use. We don't have that many calls - and if anyone's using more in scripting then they're almost certainly doing something very wrong...This also introduces a gap before
FMT
- before this patchMODE
was 127. That's very silly as anybody adding a logging message to e.g. NavEKF3 would get a compilation failure as it would pushMODE
pastFMT
!Also adds a comment to warn people of the 32-id limit. Plane's the largest user of vehicle-specific IDs with 17 defined.
Also corrected a bad sanity check.
Tidied the vehicle definitions up to remove absolute setting of specific IDs (not needed), and to make enumerations in the two vehicles where we were using defines.
Tested only with the autotest suite and a very small amount in SITL.
Edit: I flashed Rover onto CubeBlack and had a look at a produced log. All looked in order.